#@layout()

#define script()
<script>

    function doDel(id) {
        ajaxGet("#(CPATH)/admin/job/applyDoDel/" + id);
    }

</script>
#end

#define content()

<section class="content-header">
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-6">

                <div class="row mb-2">
                    <div class="col-sm-12">
                        <h1>
                            简历管理
                            <small data-toggle="tooltip" title="可以查看所有岗位，鼠标移到岗位标题上，可以对其编辑或删除等操作" data-placement="bottom"
                                   data-trigger="hover"><i class="nav-icon far fa-question-circle"></i></small>
                            <small> 首页 / 招聘 / 简历管理</small>
                        </h1>
                    </div>
                </div>

            </div>
        </div>

    </div>
</section>


<section class="content">
    <div class="container-fluid">
        <div class="card card-outline card-primary">
            <div class="card-header">
                <form class=" admin-search-panel" action="" method="get">
                    <div class="row">


                        <div class="form-group col-lg-2">
                            <input type="text" class="form-control" placeholder="请输入名称" name="username" value="#para('username')">
                        </div>

                        <div class="form-group col-lg-2">
                            <select class="form-control" name="jobId">
                                <option value="">全部岗位</option>
                                #for(job : jobList)
                                <option value="#(job.id ??)" #selectedIf(job.id == numberPara('jobId'))>#(job.title ??)</option>
                                #end
                            </select>
                        </div>


                        <div class="form-group col-lg-2">
                            <button type="submit" class="btn btn-primary ">查询</button>
                            <button type="reset" class="btn btn-default">重置</button>
                        </div>
                    </div>
                </form>
            </div>
            <div class="card-body p-0">

                <table class="table table-striped table-action">
                    <thead>
                    <tr>
                        <th style="width: 10px">
                            <input class="tableCheckAll" type="checkbox">
                        </th>
                        <th style="width: 100px">用户名称</th>
                        <th style="width: 100px">申请职位</th>
                        <th style="width: 100px">手机号</th>
                        <th style="width: 100px">工作年限</th>
                        <th style="width: 100px">最高学历</th>
                        <th style="width: 100px">是否已经查看</th>
                        <th style="width: 100px">是否已经处理</th>
                        <th style="width: 100px">处理时间</th>
                    </tr>
                    </thead>

                    <tbody>

                    #for(entry : page.list ??)
                    <tr>
                        <td><input name="tableItem" type="checkbox" value="#(entry.id)"/>
                        </td>
                        <td>
                            #(entry.user_name ??)

                            <div class="jp-action-card">
                                <div class="jp-action-body">
                                    <a href="#(CPATH)/admin/job/JobApply/detail/#(entry.id ??)">查看</a> |
                                    <a href="javascript:;" class="red-action"
                                       onclick="doDel('#(entry.id)')">删除</a>
                                </div>
                            </div>
                        </td>
                        <td>#(entry.job.title ??)</td>
                        <td>#(entry.mobile ??)</td>
                        <td>#(entry.work_years ??)</td>

                        <td>
                            #if(entry.education ?? == 0) 其它
                            #else if(entry.education ?? == 1)初中及以下
                            #else if(entry.education ?? == 2)中专/中技
                            #else if(entry.education ?? == 3)高中
                            #else if(entry.education ?? == 4)大专
                            #else if(entry.education ?? == 5)本科
                            #else if(entry.education ?? == 6)硕士
                            #else if(entry.education ?? == 7)博士
                            #end
                        </td>


                        <td>#if(entry.with_viewed ??)是
                            #else 否 #end
                        </td>

                        <td>#if(entry.with_disposed ??) 是
                            #else 否 #end
                        </td>

                        <td>#date(entry.disposed_time ??,"yyyy-MM-dd")</td>

                    </tr>
                    #end

                    </tbody>
                </table>


                <div class="card-footer">
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="row">

                                <div class="form-group">
                                    <div class="form-check">
                                        <input class="form-check-input tableCheckAll" id="checkall" type="checkbox">
                                        <label class="form-check-label" for="checkall">全选</label>
                                    </div>
                                </div>
                                <div class="form-group col-lg-3">
                                    <select class="form-control" name="action">
                                        <option value="">请选择...</option>
                                        <option value="applyDoDelByIds" open-type="del-confirm">
                                            批量删除
                                        </option>
                                    </select>
                                </div>

                                <div class="form-group col-lg-3">
                                    <button type="button" class="btn btn-outline-primary batchExec">批量操作</button>
                                </div>
                            </div>
                        </div>

                        <div class="col-sm-6">
                            #@_paginate()
                        </div>
                    </div>
                </div>

            </div>

        </div>
    </div>
</section>
#end
